package com.cxria.script

import org.junit.Before;
import org.junit.Test;

class VideoAnalysisTest {

    VideoAnalysis va

    @Before
    void before(){
        def cmdUtils = new CmdUtils()
        String.metaClass.exec = {
            cmdUtils.execute(delegate)
        }
        def qfile = new File('/home/xiefeihong/文档/qshell-result0.txt')
        va = new VideoAnalysis()
        va.putVideoInfo(qfile.readLines())
    }

    @Test
    void tryLine() {
        def videoNameInfos = ['src/u11316/v10095.mov',
                              'src/u46/v15262.mp4',
                              'src/u664/v1452.mp4',
                              'src/u46/v16111.mp4',
                              'src/u46/v16114.mp4',
                              'src/u13989/v15860.mov',
                              'src/u943/v3065.mov',
                              'src/u4805/v5478.mov',
                              'src/u17871/v12126.mov',
                              'src/u5442/v10176.mov']
        def videoPath = '/home/xiefeihong/视频'
        def mSize = 1024 * 1024
        def videoNameInfo = 'src/u4147/v8902.mp4'
        println va.tryLine(videoNameInfo as String, videoPath as String, mSize as int)
    }

}